﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace SpyTxT
{
  
    [Serializable]
    public class CityConfig
    {
        [XmlText]
        public String city{get;set;}

        public override string ToString()
        {
            return city;
        }
    }

    public class Password
    {
        [XmlText]
        public  String password{get;set;}
         public override string ToString()
        {
            return password;
        }
  
    }
    [Serializable]
    public class Account
    {
        [XmlText]
        public String account{get;set;}

        public override string ToString()
        {
            return account;
        }
    }
    [Serializable]
    public class Computerkey
    {
        [XmlText]
        public String computerkey { get;set;}
        public override string  ToString()
        {
            return computerkey;
        }
    }
    [Serializable]
    public class ListenCity
    {
        [XmlElement("city", Type = typeof(CityConfig))]
        public List<CityConfig> citylist{get;set;}

        [XmlAttribute("initcity")]
        public String initcity { get; set; }
    }

    [Serializable]
    public class AccountSet
    {
        [XmlElement("account")]
        public Account account{get;set;}

        public Password password { get; set; }

        [XmlElement("listencity")]
        public ListenCity listencity{get;set;}

        [XmlElement("computerkey")]
        public Computerkey computerkey{get;set;}
    }

    [Serializable]
    public class Listenlist
    {
        [XmlElement("accountset", Type = typeof(AccountSet))]
        public List<AccountSet> accountset{get;set;}

        [XmlAttribute("login")]
        public String login { get; set; }

        [XmlAttribute("blooplistencity")]
        public String blooplistencity { get; set;}

        [XmlAttribute("bchangelistencitytime")]
        public String bchangelistencitytime { get; set; }

        [XmlAttribute("restarttime")]
        public String restarttime { get; set; }

        [XmlAttribute("bautostart")]
        public String bautostart { get; set; }

        [XmlAttribute("recvouttime")]
        public String recvouttime { get; set; }
    }
    [Serializable]
    public class FilterData
    {
        [XmlText]
        public String filter { get; set; }

        [XmlAttribute("benable")]
        public String benable { get; set; }
    }
    [Serializable]
    public class UrlSet
    {
        [XmlText]
        public String posturl{get;set;}

        [XmlAttribute("benable")]
        public String benable { get; set;}
    }
    [Serializable]
    public class PostSet
    {
        [XmlAttribute("benable")]
        public String benable{get;set;}

        [XmlElement("urlset", Type = typeof(UrlSet))]
        public List<UrlSet> accountset { get; set; }

    }
    [Serializable]
    [XmlRoot("config")]
    public class Config
    {
        [XmlElement("listenlist")]
        public Listenlist list;

        [XmlElement("filter")]
        public FilterData filterele{get;set;}

        [XmlElement("postset")]
        public PostSet postset { get; set;}
    }
}
